package com.pktechan.api.tradeOrderStatus;


import com.pktechan.api.enumeration.ChangeTradeOrderStatusEnum;
import com.pktechan.api.enumeration.TradeOrderStatusEnum;

import java.util.Map;

/**
 * @program: cloudfloating
 * @description: 自定义改变订单状态类型单例
 * @author: qx.zhang
 * @create: 2021-03-15 11:27
 **/
public class ChangeTradeOrderStateSingleton {
    private ChangeTradeOrderStateSingleton() {
    }

    private static class Singleton {
        private static Map<ChangeTradeOrderStatusEnum, ChangeTradeOrderState> map;

        static {
            map = ChangeTradeOrderStateBeanInitialization.getMap();
        }

        private static Map<ChangeTradeOrderStatusEnum, ChangeTradeOrderState> getInstance() {
            return map;
        }
    }

    public static Map<ChangeTradeOrderStatusEnum, ChangeTradeOrderState> getInstance() {
        return Singleton.getInstance();
    }

}
